using System;
using System.Web.UI;
using System.Web;

namespace Yuanlin.Business
{
    public class ControlPanelDefaultPageRedirector : Control
    {
        protected override void OnLoad(EventArgs e)
        {
            YuanlinUser user = HttpContext.Current.User as YuanlinUser;
            if (user.IsAdministrator)
            {
                Context.Response.Redirect(SiteUrls.Instance().ControlPanelForAdministrator, true);
            }
        }
    }
}
